package com.example.Announcement.service.impl;

import com.example.Announcement.domain.Announcement;
import com.example.Announcement.mapper.AnnouncementMapper;
import com.example.Announcement.service.IAnnouncementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AnnouncementServiceImpl implements IAnnouncementService {

    @Autowired
    private AnnouncementMapper announcementMapper;

    /**
     * 查询公告
     *
     * @param announcement 查询条件
     * @return 公告列表
     */
    @Override
    public List<Announcement> selectAnnouncement(Announcement announcement) {
        return announcementMapper.selectAnnouncement(announcement);
    }

    /**
     * 新增公告
     *
     * @param announcement 要新增的公告
     */
    @Override
    public void insertAnnouncement(Announcement announcement) {
        announcementMapper.insertAnnouncement(announcement);
    }

    /**
     * 根据ID修改公告
     *
     * @param announcement 包含更新信息的公告对象
     */
    @Override
    public void updateAnnouncementById(Announcement announcement) {
        announcementMapper.updateAnnouncementById(announcement);
    }

  @Override
    public void delAnnouncementById(String announcementId) {

    }


}

